package com.yilin.xbr.controller;

import com.yilin.xbr.common.interceptor.UnInterceptor;
import com.yilin.xbr.core.base.BaseController;
import com.yilin.xbr.entity.member.Account;
import com.yilin.xbr.service.member.IAccountService;
import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@RequestMapping(value = "/member/account")
@Controller
public class DemoController extends BaseController {

   @Autowired
   private IAccountService accountService;

    @RequestMapping(value = "/getAccountById.do",method = RequestMethod.GET)
    @ResponseBody
    @UnInterceptor
    public Map<String,Object> getAccountById(String accountId){
//        Account account = accountService.getAccount(accountId);
        return jsonView(true,"查询账户成功","account");
    }
    @RequestMapping(value = "/demo.do",method = RequestMethod.GET)
    @ResponseBody
    @UnInterceptor
    public Map<String,Object> demo(String id){
        List<Account> accounts = accountService.accountAll(id);
        System.out.println(accounts);
        return jsonView(true,"查询demo成功","account");
    }

}